package com.koron.ticket.operation.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.koron.bean.base.BaseBean;
import com.koron.ticket.operation.bean.dto.OperationSubmitDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@ApiModel(value="操作票执行信息")
@Data
public class OperationExecuteBean extends BaseBean implements Serializable {

//    @ApiModelProperty(value = "唯一id")
//    private String id;

    /**
    * 操作票ID
    */
    @ApiModelProperty(value="操作票ID")
    private String operationId;

    /**
    * 操作票开始时间
    */
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value="操作票开始时间")
    private Date startTime;

    /**
    * 操作票结束时间
    */
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value="操作票结束时间")
    private Date endTime;

    /**
    * 操作人账号
    */
    @ApiModelProperty(value="操作人账号")
    private String worker;

    /**
    * 操作人名称
    */
    @ApiModelProperty(value="操作人名称")
    private String workerName;

    /**
    * 监护人账号
    */
    @ApiModelProperty(value="监护人账号")
    private String guardian;

    /**
    * 监护人名称
    */
    @ApiModelProperty(value="监护人名称")
    private String guardianName;

    /**
    * 值班负责人账号
    */
    @ApiModelProperty(value="值班负责人账号")
    private String dutyMan;

    /**
    * 值班负责人名称
    */
    @ApiModelProperty(value="值班负责人名称")
    private String dutyManName;

    /**
    * 备注
    */
    @ApiModelProperty(value="备注")
    private String desc;


    public OperationExecuteBean() {
    }

    /**
     * 审核信息
     * @param dto
     */
    public OperationExecuteBean(OperationSubmitDto dto) {
        this.operationId = dto.getId();
        this.guardian = dto.getGuardian();
        this.guardianName = dto.getGuardianName();
        this.dutyMan = dto.getDutyMan();
        this.dutyManName = dto.getDutyManName();
    }

    private static final long serialVersionUID = 1L;
}
